package com.itboye.eweilisten.util.camera;


import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;

import com.itboye.eweilisten.R;

public class SelectImageView extends FrameLayout {

 
	public ImageView iv;

	public View isselect;
	public SelectImageView(Context context) {
		super(context);
		init();
	}

	public SelectImageView(Context context, AttributeSet attrs) {
		super(context, attrs);
		init();
	}

	public SelectImageView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		init();
	}

	private void init() {
		 LayoutInflater.from(getContext()).inflate(R.layout.item_photoselect_view, this,true);
		 
		iv= (ImageView) findViewById(R.id.img);
		isselect=findViewById(R.id.isselect);
		
		iv.setScaleType(ScaleType.CENTER_CROP);
	}

	 
 
	 
	public void setSelectViewSelected(boolean selected) {
		// TODO Auto-generated method stub
		if (selected) {
			isselect.setBackgroundDrawable(getResources().getDrawable(R.drawable.diaocha_true));
		}else{
			isselect.setBackgroundDrawable(getResources().getDrawable(R.drawable.daiocha_false));
		}
		 
	}

}
